Skip to content

Conversation

mic-tilted
Copy link

I followed the documentation https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/tree.md#building-trees-from-your-entities

And I'm encountering this error:

In AssociationMapping.php line 256:

  Unknown property "mappedBy" on class Doctrine\ORM\Mapping\ManyToOneAssociationMapping

The error occurs when the $parent field is defined before $children in a Tree entity. I forked the repository and ran the tests, reversing the order of the fields in tests/Gedmo/Tree/Fixture/RootCategory.php, and I managed to reproduce the same error.

…s defined before the child field in a tree structure.
@phansys phansys added Bug A confirmed bug in Extensions that needs fixing. Tree Needs Changelog note Needs Tests labels Jan 14, 2025
Copy link

@SimonChabrier SimonChabrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Aug 29, 2025
@phansys phansys removed the Stale label Sep 20, 2025
Copy link
Collaborator

@phansys phansys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mic-tilted!

Could you please add tests covering the problematic scenario and the corresponding entries in the changelog file? If this change is fixing a bug, this requires at least an entry in the Fixed section.

See: https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/CONTRIBUTING.md#changelog.

@phansys phansys added the Still Relevant Mark PRs that might've been auto-closed that are still relevant. label Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A confirmed bug in Extensions that needs fixing. Needs Changelog note Needs Tests Still Relevant Mark PRs that might've been auto-closed that are still relevant. Tree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants